package com.dubbo.demo.provider;

import com.dubbo.demo.api.User;
import com.dubbo.demo.api.UserService;
import org.apache.dubbo.config.annotation.Service;

/**
 * @Author: zj
 * @Description:
 * @Date: Created in 11:42 2020/8/10
 * @Modified By:
 */
@Service(cluster = "failfast",loadbalance = "random")
public class UserServiceImpl implements UserService {

    @Override
    public User getUser(Long id) {
        User user = new User();
        user.setId(id);
        user.setUserName("zahngsan");
        user.setAge(30);
        return user;
    }
}
